﻿@model KL.Store.Web.Models.CategoryMetaEditModel
@using KL.Store.Core;
@using CaptchaMvc.HtmlHelpers;
@{
    Layout = null;
}
<h3>Kategori Meta Bilgilerini Düzenle</h3>
<hr />
@using (Ajax.BeginForm(null, null, null, new AjaxOptions { HttpMethod = "Post", OnBegin = "loadingMsg();" }, new { id = "categorymetaedit", name = "categorymetaedit", @class = "form-horizontal editform" }))
{
    @Html.HiddenFor(model => model.CategoryId);
    <div class="form-group">
        <label for="Name" class="col-xs-2 control-label first">Kategori Başlığı:</label>
        <div class="col-xs-10">
            @Html.TextBoxFor(model => model.WebTitle, new { @class = "form-control", @placeHolder = "Kategorinin başlığını giriniz" })
            @Html.ValidationMessageFor(model => model.WebTitle)
        </div>
    </div>
    <div class="form-group">
        <label for="Name" class="col-xs-2 control-label first">Meta Description:</label>
        <div class="col-xs-10">
            @Html.TextBoxFor(model => model.Description, new { @class = "form-control", @placeHolder = "Kategorinin bilgisini giriniz" })
            @Html.ValidationMessageFor(model => model.Description)
        </div>
    </div>
    <div class="form-group">
        <label for="Name" class="col-xs-2 control-label first">Meta Keywords:</label>
        <div class="col-xs-10">
            @Html.TextBoxFor(model => model.Keywords, new { @class = "form-control", @placeHolder = "Kategorinin anahtar kelimelerini giriniz" })
            @Html.ValidationMessageFor(model => model.Keywords)
        </div>
    </div>
    <div class="form-group">
        <label for="Name" class="col-xs-2 control-label first">Canonical URL</label>
        <div class="col-xs-10">
            @Html.TextBoxFor(model => model.Canonical, new { @class = "form-control", @placeHolder = "Kategorinin canonical urlini giriniz" })
            @Html.ValidationMessageFor(model => model.Canonical)
        </div>
    </div>
    <hr />
    <div class="form-group">
        <div class="col-xs-12">
            @Html.ValidationSummary(true, "Form gönderilemedi. Lütfen eksik bilgileri kontrol ediniz.")
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-12 first alignright">
            <button type="submit" class="btn btn-custom1" onclick="kaydetKapat();">Kaydet ve Kapat</button>
            <button type="submit" class="btn btn-custom1">Kaydet</button>
        </div>
    </div>
    <input type="hidden" name="completeResult" value="@(ViewBag.completeResult)" />
}
<script>
    function kaydetKapat()
    {
        $('input[name=completeResult]').val('1');
    }
</script>
